package com.yjy.mapper;

import com.yjy.entity.Admin;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AdminMapper {
    List<Admin> selectAll(Admin admin);

    void insert(Admin admin);

    @Select("SELECT * from `admin` where username = #{username}")
    Admin selectByUsername(String username);

    void updateById(Admin admin);

    @Delete("delete from admin where id = #{id}")
    void deleteById(Integer id);

    void deleteBatch(@Param("adminList") List<Admin> adminList);

    @Select("SELECT * from `admin` where id = #{id}")
    Admin selectById(String id);
}
